package com.company.test.synthetic;

import java.lang.reflect.Method;
import java.util.Calendar;

public class SyntheticDemo {
    public void testSynthetic(String name,Integer age) {
        try {
            Method[] methods = subSyntheticDemo.class.getDeclaredMethods();
            for (Method method : methods) {
                System.out.println(method.toString() + ", " + method.isSynthetic());
            }
        } catch (SecurityException e) {
            e.printStackTrace();
        }
    }

    class subSyntheticDemo{
        private int age;
        private String name;

        private subSyntheticDemo() {
        }
        private subSyntheticDemo(int age, String name) {
            this.age = age;
            this.name = name;
        }
        private int getAge() {
            return age;
        }
        private void setAge(int age) {
            this.age = age;
        }
        private String getName() {
            return name;
        }
        private void setName(String name) {
            this.name = name;
        }
    }
}
